/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package busquedas;

import java.util.ArrayList;
import programita.Alumno;

/**
 *
 * @author Leo
 */
public class CombinarListas {
    public static ArrayList<Alumno> combinarL(ArrayList<Alumno> a1,ArrayList<Alumno> a2){
        ArrayList<Alumno> alumnosDevolucion=new ArrayList<Alumno>();
        
        for(int i=0; i<a1.size();i++){
            Alumno alumno1=a1.get(i);
            for(int b=0;i<a2.size();i++){
               
               if(alumno1.getId()==(a2.get(i).getId())){
                   alumnosDevolucion.add(alumno1);
               }
            }
        }
        
        
        
        return alumnosDevolucion;
    }
}
